#nullable enable

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;

namespace PHMEE.EnergyEfficiency;

public interface IDigitalSignalAppService
{
    /// <summary>
    /// 获取实时开关量信号
    /// </summary>
    /// <param name="vesselId"></param>
    /// <returns></returns>
    Task<List<DigitalGroupDto>> GetRealtimeDigitalSignalsAsync(Guid vesselId);

    /// <summary>
    /// 查询报警记录
    /// </summary>
    /// <param name="vesselId"></param>
    /// <returns></returns>
    Task<List<DigitalSignalDto>> GetDigitalAlarmRecordsAsync(Guid vesselId);
    
    /// <summary>
    /// 查询每个 tag 最新状态为报警的记录
    /// </summary>
    /// <param name="vesselId"></param>
    /// <returns></returns>
    Task<List<DigitalSignalDto>> GetEveryTagsLatestAlarmRecordsAsync(Guid vesselId);
    
    /// <summary>
    /// 根据 AMS Group，查询实时的报警记录
    /// </summary>
    /// <param name="vesselId"></param>
    /// <param name="amsGroup"></param>
    /// <returns></returns>
    Task<List<DigitalSignalDto>> GetRealtimeDigitalAlarmRecordsByAmsGroupAsync(Guid vesselId, string amsGroup);

    /// <summary>
    /// 查询报警历史
    /// </summary>
    /// <param name="vesselId"></param>
    /// <param name="tagName"></param>
    /// <param name="tagDescription"></param>
    /// <param name="startDateTime"></param>
    /// <param name="endDateTime"></param>
    /// <param name="skipCount"></param>
    /// <param name="maxResultCount"></param>
    /// <returns></returns>
    Task<PagedResultDto<DigitalSignalDto>> GetDigitalAlarmHistoryAsync(Guid vesselId, string? tagName,
        string? tagDescription, DateTime startDateTime, DateTime endDateTime, int skipCount, int maxResultCount);
}